Skip to content

[Core] Add FlashTransfer Logic, Fix Aot and mac sending image issue#59

Merged
Linwenxuan04 merged 2 commits into
LagrangeDev:mainfrom
Lilyltt:main
Sep 11, 2025
Merged

[Core] Add FlashTransfer Logic, Fix Aot and mac sending image issue#59
Linwenxuan04 merged 2 commits into
LagrangeDev:mainfrom
Lilyltt:main

Conversation

@Lilyltt
Copy link
Copy Markdown
Contributor

@Lilyltt Lilyltt commented Sep 11, 2025

No description provided.

Co-authored-by: sisi0318 <sisi0318@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 11, 2025 11:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements FlashTransfer logic for image uploads as an alternative to Highway uploads, specifically targeting AOT (Ahead-of-Time) compilation scenarios and macOS environments where dynamic code compilation issues occur.

  • Adds conditional upload logic to use FlashTransfer instead of Highway uploads on AOT and macOS platforms
  • Implements a complete FlashTransfer upload system with chunked file transfers and SHA1 verification
  • Adds new service packet classes for FlashTransfer protocol communication

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Lagrange.Core/Message/Entities/ImageEntity.cs Modified preprocessing to conditionally use FlashTransfer based on runtime platform detection
Lagrange.Core/Internal/Packets/Service/FlashTransferUploadResp.cs Added response packet structure for FlashTransfer uploads
Lagrange.Core/Internal/Packets/Service/FlashTransferUploadReq.cs Added request packet structures with chunked upload body and SHA1 state management
Lagrange.Core/Internal/Context/FlashTransferContext.cs Implemented core FlashTransfer upload logic with chunked file processing
Lagrange.Core/BotContext.cs Added FlashTransferContext initialization to bot context

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread Lagrange.Core/Internal/Context/FlashTransferContext.cs Outdated
Comment thread Lagrange.Core/Message/Entities/ImageEntity.cs
Comment thread Lagrange.Core/Internal/Context/FlashTransferContext.cs Outdated
@Linwenxuan04 Linwenxuan04 merged commit af03489 into LagrangeDev:main Sep 11, 2025
9 checks passed
Bemly pushed a commit to Bemly/CharonAnchor that referenced this pull request May 3, 2026
…agrangeDev#59)

Co-authored-by: sisi0318 <sisi0318@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants